Bayer_1.1 <- read_excel('136.5 92.90.xlsx', sheet = 1)
Bayer_1.2 <- read_excel('136.5 92.90.xlsx', sheet = 2)
Bayer_1.3 <- read_excel('136.5 92.90.xlsx', sheet = 3)
PV_1.1 <- read_excel('136.5 92.90.xlsx', sheet = 4)
PV_1.2 <- read_excel('136.5 92.90.xlsx', sheet = 5)
PV_1.3 <- read_excel('136.5 92.90.xlsx', sheet = 6)
WAL_1.1 <- read_excel('136.5 92.90.xlsx', sheet = 7)
WAL_1.2 <- read_excel('136.5 92.90.xlsx', sheet = 8)
WAL_1.3 <- read_excel('136.5 92.90.xlsx', sheet = 9)

## Perform within-group analysis of Bayer pills. 
peakanalyze(Bayer_1.1)
## [1] "Bayer_1.1"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.328   Min.   :   120   Min.   :2.328   Min.   :   240  
##  1st Qu.:2.481   1st Qu.:  6452   1st Qu.:2.481   1st Qu.:  6040  
##  Median :2.634   Median : 33105   Median :2.634   Median : 33025  
##  Mean   :2.634   Mean   : 53943   Mean   :2.634   Mean   : 54405  
##  3rd Qu.:2.787   3rd Qu.: 79618   3rd Qu.:2.787   3rd Qu.:107163  
##  Max.   :2.941   Max.   :204760   Max.   :2.941   Max.   :173000  
##      Time3         Intensity3    
##  Min.   :2.328   Min.   :   240  
##  1st Qu.:2.481   1st Qu.:  6070  
##  Median :2.634   Median : 34650  
##  Mean   :2.634   Mean   : 53536  
##  3rd Qu.:2.787   3rd Qu.: 74108  
##  Max.   :2.941   Max.   :222280  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(Bayer_1.2)
## [1] "Bayer_1.2"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.328   Min.   :   250   Min.   :2.328   Min.   :   270  
##  1st Qu.:2.506   1st Qu.:  3760   1st Qu.:2.506   1st Qu.:  4012  
##  Median :2.683   Median : 27845   Median :2.683   Median : 27880  
##  Mean   :2.683   Mean   : 47037   Mean   :2.683   Mean   : 51975  
##  3rd Qu.:2.861   3rd Qu.: 77558   3rd Qu.:2.861   3rd Qu.: 69975  
##  Max.   :3.038   Max.   :202520   Max.   :3.038   Max.   :229630  
##      Time3         Intensity3    
##  Min.   :2.328   Min.   :   220  
##  1st Qu.:2.506   1st Qu.:  3602  
##  Median :2.683   Median : 24650  
##  Mean   :2.683   Mean   : 48695  
##  3rd Qu.:2.861   3rd Qu.: 61968  
##  Max.   :3.038   Max.   :213580  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(Bayer_1.3)
## [1] "Bayer_1.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.303   Min.   :   110   Min.   :2.328   Min.   :   220  
##  1st Qu.:2.481   1st Qu.:  3208   1st Qu.:2.499   1st Qu.:  3620  
##  Median :2.659   Median : 21670   Median :2.671   Median : 24000  
##  Mean   :2.659   Mean   : 50720   Mean   :2.671   Mean   : 41758  
##  3rd Qu.:2.836   3rd Qu.: 79420   3rd Qu.:2.842   3rd Qu.: 53860  
##  Max.   :3.014   Max.   :257870   Max.   :3.014   Max.   :175660  
##                                   NA's   :1       NA's   :1       
##      Time3         Intensity3    
##  Min.   :2.303   Min.   :   130  
##  1st Qu.:2.481   1st Qu.:  3370  
##  Median :2.659   Median : 23220  
##  Mean   :2.659   Mean   : 39976  
##  3rd Qu.:2.836   3rd Qu.: 70343  
##  Max.   :3.014   Max.   :146600  
##                                  
## 
## Duplicates:  0
##  NA Values:  2

## Perform within-group analysis of PV pills
peakanalyze(PV_1.1)
## [1] "PV_1.1"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.377   Min.   :   140   Min.   :2.377   Min.   :   390  
##  1st Qu.:2.536   1st Qu.:  3420   1st Qu.:2.536   1st Qu.:  3050  
##  Median :2.695   Median : 31220   Median :2.695   Median : 29030  
##  Mean   :2.695   Mean   : 36666   Mean   :2.695   Mean   : 35050  
##  3rd Qu.:2.855   3rd Qu.: 54260   3rd Qu.:2.855   3rd Qu.: 53545  
##  Max.   :3.014   Max.   :131020   Max.   :3.014   Max.   :122960  
##  NA's   :1       NA's   :1        NA's   :1       NA's   :1       
##      Time3         Intensity3    
##  Min.   :2.352   Min.   :   130  
##  1st Qu.:2.518   1st Qu.:  2628  
##  Median :2.683   Median : 28835  
##  Mean   :2.683   Mean   : 34384  
##  3rd Qu.:2.849   3rd Qu.: 51208  
##  Max.   :3.014   Max.   :121930  
##                                  
## 
## Duplicates:  0
##  NA Values:  4

peakanalyze(PV_1.2)
## [1] "PV_1.2"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.352   Min.   :   100   Min.   :2.352   Min.   :   130  
##  1st Qu.:2.518   1st Qu.:  3575   1st Qu.:2.518   1st Qu.:  3645  
##  Median :2.683   Median : 27450   Median :2.683   Median : 27225  
##  Mean   :2.683   Mean   : 41601   Mean   :2.683   Mean   : 39185  
##  3rd Qu.:2.849   3rd Qu.: 63115   3rd Qu.:2.849   3rd Qu.: 64878  
##  Max.   :3.014   Max.   :159070   Max.   :3.014   Max.   :120080  
##      Time3         Intensity3    
##  Min.   :2.352   Min.   :   200  
##  1st Qu.:2.518   1st Qu.:  2962  
##  Median :2.683   Median : 29310  
##  Mean   :2.683   Mean   : 38665  
##  3rd Qu.:2.849   3rd Qu.: 57730  
##  Max.   :3.014   Max.   :154930  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(PV_1.3)
## [1] "PV_1.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.352   Min.   :   230   Min.   :2.352   Min.   :   230  
##  1st Qu.:2.487   1st Qu.: 10815   1st Qu.:2.506   1st Qu.:  5675  
##  Median :2.622   Median : 34410   Median :2.659   Median : 31575  
##  Mean   :2.622   Mean   : 46327   Mean   :2.659   Mean   : 46890  
##  3rd Qu.:2.757   3rd Qu.: 66260   3rd Qu.:2.812   3rd Qu.: 78155  
##  Max.   :2.892   Max.   :145560   Max.   :2.965   Max.   :146280  
##  NA's   :3       NA's   :3                                        
##      Time3         Intensity3    
##  Min.   :2.352   Min.   :   310  
##  1st Qu.:2.493   1st Qu.: 10338  
##  Median :2.634   Median : 34340  
##  Mean   :2.634   Mean   : 46736  
##  3rd Qu.:2.775   3rd Qu.: 65488  
##  Max.   :2.916   Max.   :165890  
##  NA's   :2       NA's   :2       
## 
## Duplicates:  0
##  NA Values:  10

## Perform within-group analysis of WAL pills.
peakanalyze(WAL_1.1)
## [1] "WAL_1.1"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.352   Min.   :   250   Min.   :2.328   Min.   :   140  
##  1st Qu.:2.512   1st Qu.:  3435   1st Qu.:2.493   1st Qu.:  2912  
##  Median :2.671   Median : 25910   Median :2.659   Median : 20915  
##  Mean   :2.671   Mean   : 37394   Mean   :2.659   Mean   : 35689  
##  3rd Qu.:2.830   3rd Qu.: 60820   3rd Qu.:2.824   3rd Qu.: 62420  
##  Max.   :2.990   Max.   :141300   Max.   :2.990   Max.   :117660  
##  NA's   :1       NA's   :1                                        
##      Time3         Intensity3    
##  Min.   :2.328   Min.   :    90  
##  1st Qu.:2.493   1st Qu.:  3048  
##  Median :2.659   Median : 24440  
##  Mean   :2.659   Mean   : 38178  
##  3rd Qu.:2.824   3rd Qu.: 68835  
##  Max.   :2.990   Max.   :155630  
##                                  
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(WAL_1.2)
## [1] "WAL_1.2"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.377   Min.   :  1350   Min.   :2.352   Min.   :   580  
##  1st Qu.:2.536   1st Qu.:  4515   1st Qu.:2.518   1st Qu.:  3595  
##  Median :2.695   Median : 34820   Median :2.683   Median : 32335  
##  Mean   :2.695   Mean   : 53341   Mean   :2.683   Mean   : 45535  
##  3rd Qu.:2.855   3rd Qu.: 82320   3rd Qu.:2.849   3rd Qu.: 71400  
##  Max.   :3.014   Max.   :186970   Max.   :3.014   Max.   :146900  
##  NA's   :1       NA's   :1                                        
##      Time3         Intensity3    
##  Min.   :2.352   Min.   :   640  
##  1st Qu.:2.518   1st Qu.:  4555  
##  Median :2.683   Median : 33420  
##  Mean   :2.683   Mean   : 49974  
##  3rd Qu.:2.849   3rd Qu.: 78105  
##  Max.   :3.014   Max.   :168900  
##                                  
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(WAL_1.3)
## [1] "WAL_1.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.352   Min.   :   550   Min.   :2.352   Min.   :  1080  
##  1st Qu.:2.524   1st Qu.:  5080   1st Qu.:2.524   1st Qu.:  4090  
##  Median :2.695   Median : 31440   Median :2.695   Median : 28290  
##  Mean   :2.695   Mean   : 50665   Mean   :2.695   Mean   : 47099  
##  3rd Qu.:2.867   3rd Qu.: 72190   3rd Qu.:2.867   3rd Qu.: 70820  
##  Max.   :3.038   Max.   :224230   Max.   :3.038   Max.   :166550  
##  NA's   :1       NA's   :1        NA's   :1       NA's   :1       
##      Time3         Intensity3    
##  Min.   :2.328   Min.   :   380  
##  1st Qu.:2.506   1st Qu.:  4642  
##  Median :2.683   Median : 32535  
##  Mean   :2.683   Mean   : 46745  
##  3rd Qu.:2.861   3rd Qu.: 67715  
##  Max.   :3.038   Max.   :169130  
##                                  
## 
## Duplicates:  0
##  NA Values:  4

## Perform between-group analysis of 136.5 92.90 peaks
bet_group_line(Bayer_1.1, PV_1.1,WAL_1.1)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_1.2, PV_1.2,WAL_1.2)
## Warning: Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_1.3, PV_1.3,WAL_1.3)
## Warning: Removed 3 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Warning: Removed 2 row(s) containing missing values (geom_path).

between_groups(PV_1.1,PV_1.2,PV_1.3,WAL_1.1,WAL_1.2,WAL_1.3,Bayer_1.1,Bayer_1.2,Bayer_1.3)
## [1] "Between Group Summary: Bayer, PV, WAL"
##             Df    Sum Sq  Mean Sq F value Pr(>F)
## Brands       2 114996102 57498051   1.563  0.284
## Residuals    6 220755313 36792552

## [1] "Tukey HSD Test:"
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = AUP ~ Brands)
## 
## $Brands
##                diff       lwr       upr     p adj
## PV-Bayer  -8752.190 -23948.16  6443.784 0.2579907
## WAL-Bayer -4158.304 -19354.28 11037.669 0.6942847
## WAL-PV     4593.885 -10602.09 19789.859 0.6443302

Bayer - Intensity1 in Bayer pills 2 and 3 seems to be considerably different than the other two. AUC for Bayer three, intensity1 is significantly different than the other two. Outliers are present in all three Pill samples. Pills 1 and 3 have different distributions for Intensity2. PV - Pill 3 Intensity 2 appears distinctly different with a higher AUC and a left skewed distribution. Pills 1 and 2 look similar. Outliers are present in all three samples. WAL - AUC for intensity 1 in pills 2 and 3 is much larger than other two. All three intensities in pill 1 have slight skewed distribution. Outliers present in only pill 3. Between group ANOVA - Pill 1 plots show Bayer being significantly different than other two brands. The other two plots look very similar. AOV shows a p-value > .05. We can reject the null hypothesis and conclude that there is no difference between all three pill brands for this peak. QQplot shows that residuals fit line very well and residuals vs fitted is horizontal at zero with no distinct patterns. This suggest assumptions for anova are good.

Bayer_2.1 <- read_excel('178.7 93.00.xlsx', sheet = 1)
Bayer_2.2 <- read_excel('178.7 93.00.xlsx', sheet = 2)
Bayer_2.3 <- read_excel('178.7 93.00.xlsx', sheet = 3)
PV_2.1 <- read_excel('178.7 93.00.xlsx', sheet = 4)
PV_2.2 <- read_excel('178.7 93.00.xlsx', sheet = 5)
PV_2.3 <- read_excel('178.7 93.00.xlsx', sheet = 6)
WAL_2.1 <- read_excel('178.7 93.00.xlsx', sheet = 7)
WAL_2.2 <- read_excel('178.7 93.00.xlsx', sheet = 8)
WAL_2.3 <- read_excel('178.7 93.00.xlsx', sheet = 9)

## Perform within-group analysis of Bayer pills. 
peakanalyze(Bayer_2.1)
## [1] "Bayer_2.1"
##      Time1         Intensity1        Time2         Intensity2     
##  Min.   :2.328   Min.   :  110   Min.   :2.328   Min.   :   40.0  
##  1st Qu.:2.493   1st Qu.: 1230   1st Qu.:2.493   1st Qu.:  897.5  
##  Median :2.659   Median : 8370   Median :2.659   Median : 7725.0  
##  Mean   :2.659   Mean   :17919   Mean   :2.659   Mean   :17546.1  
##  3rd Qu.:2.824   3rd Qu.:26313   3rd Qu.:2.824   3rd Qu.:29172.5  
##  Max.   :2.990   Max.   :73650   Max.   :2.990   Max.   :80900.0  
##  NA's   :3       NA's   :3       NA's   :3       NA's   :3        
##      Time3         Intensity3   
##  Min.   :2.303   Min.   :   60  
##  1st Qu.:2.487   1st Qu.: 1140  
##  Median :2.671   Median : 5790  
##  Mean   :2.671   Mean   :14658  
##  3rd Qu.:2.855   3rd Qu.:21130  
##  Max.   :3.038   Max.   :72470  
##                                 
## 
## Duplicates:  0
##  NA Values:  12

peakanalyze(Bayer_2.2)
## [1] "Bayer_2.2"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.328   Min.   :  170   Min.   :2.352   Min.   :  560  
##  1st Qu.:2.469   1st Qu.: 2320   1st Qu.:2.487   1st Qu.: 2655  
##  Median :2.610   Median :10635   Median :2.622   Median :13550  
##  Mean   :2.610   Mean   :18043   Mean   :2.622   Mean   :18366  
##  3rd Qu.:2.751   3rd Qu.:32723   3rd Qu.:2.757   3rd Qu.:28055  
##  Max.   :2.892   Max.   :56120   Max.   :2.892   Max.   :78190  
##                                  NA's   :1       NA's   :1      
##      Time3         Intensity3   
##  Min.   :2.352   Min.   :  320  
##  1st Qu.:2.475   1st Qu.: 4340  
##  Median :2.597   Median :15060  
##  Mean   :2.597   Mean   :21779  
##  3rd Qu.:2.720   3rd Qu.:33990  
##  Max.   :2.842   Max.   :70220  
##  NA's   :3       NA's   :3      
## 
## Duplicates:  0
##  NA Values:  8

peakanalyze(Bayer_2.3)
## [1] "Bayer_2.3"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.352   Min.   :  460   Min.   :2.352   Min.   :  360  
##  1st Qu.:2.506   1st Qu.: 1305   1st Qu.:2.506   1st Qu.: 1362  
##  Median :2.659   Median : 8525   Median :2.659   Median : 8240  
##  Mean   :2.659   Mean   :15085   Mean   :2.659   Mean   :15444  
##  3rd Qu.:2.812   3rd Qu.:24820   3rd Qu.:2.812   3rd Qu.:21195  
##  Max.   :2.965   Max.   :61110   Max.   :2.965   Max.   :53400  
##      Time3         Intensity3   
##  Min.   :2.352   Min.   :  470  
##  1st Qu.:2.506   1st Qu.: 1228  
##  Median :2.659   Median : 7710  
##  Mean   :2.659   Mean   :14856  
##  3rd Qu.:2.812   3rd Qu.:23853  
##  Max.   :2.965   Max.   :71130  
## 
## Duplicates:  0
##  NA Values:  0

## Perform within-group analysis of PV pills
peakanalyze(PV_2.1)
## [1] "PV_2.1"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.401   Min.   :  440   Min.   :2.401   Min.   :  720  
##  1st Qu.:2.536   1st Qu.: 3155   1st Qu.:2.536   1st Qu.: 2235  
##  Median :2.671   Median :12890   Median :2.671   Median :13650  
##  Mean   :2.671   Mean   :18624   Mean   :2.671   Mean   :17426  
##  3rd Qu.:2.806   3rd Qu.:30630   3rd Qu.:2.806   3rd Qu.:28025  
##  Max.   :2.941   Max.   :65230   Max.   :2.941   Max.   :63490  
##      Time3         Intensity3   
##  Min.   :2.401   Min.   :  860  
##  1st Qu.:2.536   1st Qu.: 2435  
##  Median :2.671   Median :11680  
##  Mean   :2.671   Mean   :18386  
##  3rd Qu.:2.806   3rd Qu.:28375  
##  Max.   :2.941   Max.   :62780  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(PV_2.2)
## [1] "PV_2.2"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.401   Min.   :  630   Min.   :2.401   Min.   :  720  
##  1st Qu.:2.536   1st Qu.: 2620   1st Qu.:2.536   1st Qu.: 2590  
##  Median :2.671   Median :14910   Median :2.671   Median :15710  
##  Mean   :2.671   Mean   :21731   Mean   :2.671   Mean   :19671  
##  3rd Qu.:2.806   3rd Qu.:36670   3rd Qu.:2.806   3rd Qu.:30530  
##  Max.   :2.941   Max.   :71640   Max.   :2.941   Max.   :68250  
##      Time3         Intensity3   
##  Min.   :2.401   Min.   :  630  
##  1st Qu.:2.536   1st Qu.: 2075  
##  Median :2.671   Median :11750  
##  Mean   :2.671   Mean   :18767  
##  3rd Qu.:2.806   3rd Qu.:28805  
##  Max.   :2.941   Max.   :72340  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(PV_2.3)
## [1] "PV_2.3"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.401   Min.   : 1250   Min.   :2.401   Min.   : 1150  
##  1st Qu.:2.518   1st Qu.: 6728   1st Qu.:2.518   1st Qu.: 5622  
##  Median :2.634   Median :15535   Median :2.634   Median :15560  
##  Mean   :2.634   Mean   :23720   Mean   :2.634   Mean   :24937  
##  3rd Qu.:2.751   3rd Qu.:35743   3rd Qu.:2.751   3rd Qu.:36270  
##  Max.   :2.867   Max.   :75830   Max.   :2.867   Max.   :75430  
##      Time3         Intensity3   
##  Min.   :2.401   Min.   : 1430  
##  1st Qu.:2.518   1st Qu.: 6230  
##  Median :2.634   Median :16790  
##  Mean   :2.634   Mean   :21670  
##  3rd Qu.:2.751   3rd Qu.:31225  
##  Max.   :2.867   Max.   :59350  
## 
## Duplicates:  0
##  NA Values:  0

## Perform within-group analysis of WAL pills.
peakanalyze(WAL_2.1)
## [1] "WAL_2.1"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.352   Min.   :  180   Min.   :2.352   Min.   :  210  
##  1st Qu.:2.475   1st Qu.: 2900   1st Qu.:2.475   1st Qu.: 3830  
##  Median :2.597   Median :11800   Median :2.597   Median :13330  
##  Mean   :2.597   Mean   :18958   Mean   :2.597   Mean   :20200  
##  3rd Qu.:2.720   3rd Qu.:29670   3rd Qu.:2.720   3rd Qu.:32290  
##  Max.   :2.842   Max.   :60840   Max.   :2.842   Max.   :76840  
##      Time3         Intensity3   
##  Min.   :2.352   Min.   :  260  
##  1st Qu.:2.475   1st Qu.: 3690  
##  Median :2.597   Median :11910  
##  Mean   :2.597   Mean   :18901  
##  3rd Qu.:2.720   3rd Qu.:28450  
##  Max.   :2.842   Max.   :61280  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(WAL_2.2)
## [1] "WAL_2.2"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.352   Min.   :  190   Min.   :2.352   Min.   :  300  
##  1st Qu.:2.487   1st Qu.: 3350   1st Qu.:2.487   1st Qu.: 2505  
##  Median :2.622   Median :13350   Median :2.622   Median :12780  
##  Mean   :2.622   Mean   :21182   Mean   :2.622   Mean   :20244  
##  3rd Qu.:2.757   3rd Qu.:36725   3rd Qu.:2.757   3rd Qu.:32320  
##  Max.   :2.892   Max.   :63910   Max.   :2.892   Max.   :68880  
##      Time3         Intensity3   
##  Min.   :2.352   Min.   :  360  
##  1st Qu.:2.487   1st Qu.: 3650  
##  Median :2.622   Median :15390  
##  Mean   :2.622   Mean   :22211  
##  3rd Qu.:2.757   3rd Qu.:35240  
##  Max.   :2.892   Max.   :70760  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(WAL_2.3)
## [1] "WAL_2.3"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.352   Min.   :  290   Min.   :2.352   Min.   :  440  
##  1st Qu.:2.481   1st Qu.: 4925   1st Qu.:2.481   1st Qu.: 3712  
##  Median :2.610   Median :13530   Median :2.610   Median :14795  
##  Mean   :2.610   Mean   :23415   Mean   :2.610   Mean   :23290  
##  3rd Qu.:2.738   3rd Qu.:36580   3rd Qu.:2.738   3rd Qu.:38538  
##  Max.   :2.867   Max.   :66990   Max.   :2.867   Max.   :71870  
##      Time3         Intensity3   
##  Min.   :2.352   Min.   :  360  
##  1st Qu.:2.481   1st Qu.: 3882  
##  Median :2.610   Median :15075  
##  Mean   :2.610   Mean   :22910  
##  3rd Qu.:2.738   3rd Qu.:35850  
##  Max.   :2.867   Max.   :82400  
## 
## Duplicates:  0
##  NA Values:  0

## Perform between-group analysis of 136.5 92.90 peaks
bet_group_line(Bayer_2.1, PV_2.1,WAL_2.1)
## Warning: Removed 3 row(s) containing missing values (geom_path).
## Removed 3 row(s) containing missing values (geom_path).

bet_group_line(Bayer_2.2, PV_2.2,WAL_2.2)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 3 row(s) containing missing values (geom_path).

bet_group_line(Bayer_2.3, PV_2.3, WAL_2.3)

between_groups(PV_2.1,PV_2.2,PV_2.3,WAL_2.1,WAL_2.2,WAL_2.3,Bayer_2.1,Bayer_2.2,
               Bayer_2.3)
## [1] "Between Group Summary: Bayer, PV, WAL"
##             Df   Sum Sq  Mean Sq F value Pr(>F)
## Brands       2 30015873 15007937   2.893  0.132
## Residuals    6 31123272  5187212

## [1] "Tukey HSD Test:"
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = AUP ~ Brands)
## 
## $Brands
##                diff       lwr      upr     p adj
## PV-Bayer  3470.6241 -2235.163 9176.411 0.2281877
## WAL-Bayer 4179.4915 -1526.296 9885.279 0.1408870
## WAL-PV     708.8674 -4996.920 6414.655 0.9240121

Bayer - Pill 1 has a skewed distribution for all three pills. AUC appears to be consistent for all three pills. Outliers present in all three pills. Pill 2, intensities 2 and 3 appear to be distinctly different in line plot. Outliers present in all three pills. PV - Normal distribution throughout all three pills. Pill 2 has outliers and AUC for intensity1 is quite a bit higher than other two. Line plot shows intensity1 looks different as well. Pill3 intensity3 looks lower than other two, AUC is a few thousand less as well. Outliers in pill 2 WAL - Pill 1 intensity 2 looks higher and the AUC is quite a bit more than other two. AUCs for other two pills are consistent. Line plots look similar. Outlier in pill 1.

Between group analysis - Line plots look similar for all three pills. Between group ANOVA shows that all three means are similar with a pvalue of 0.132. We can reject the null hypothesis and conclude that there is no difference between all three pill brands for this peak. QQplot shows slight upper and lower tails, residuals fit well throughtout center. Residuals vs fitted is horizontal at zero with no distinguishable patterns. This suggests assumptions for anova are good.

Bayer_3.1 <- read_excel('199.10 91.90.xlsx', sheet = 1)
Bayer_3.2 <- read_excel('199.10 91.90.xlsx', sheet = 2)
Bayer_3.3 <- read_excel('199.10 91.90.xlsx', sheet = 3)
PV_3.1 <- read_excel('199.10 91.90.xlsx', sheet = 4)
PV_3.2 <- read_excel('199.10 91.90.xlsx', sheet = 5)
PV_3.3 <- read_excel('199.10 91.90.xlsx', sheet = 6)
WAL_3.1 <- read_excel('199.10 91.90.xlsx', sheet = 7)
WAL_3.2 <- read_excel('199.10 91.90.xlsx', sheet = 8)
WAL_3.3 <- read_excel('199.10 91.90.xlsx', sheet = 9)

## Perform within-group analysis of Bayer pills. 
peakanalyze(Bayer_3.1)
## [1] "Bayer_3.1"
##      Time1         Intensity1       Time2         Intensity2    
##  Min.   :2.475   Min.   : 170   Min.   :2.450   Min.   : 180.0  
##  1st Qu.:2.610   1st Qu.: 375   1st Qu.:2.591   1st Qu.: 315.0  
##  Median :2.744   Median : 660   Median :2.732   Median : 505.0  
##  Mean   :2.744   Mean   : 713   Mean   :2.732   Mean   : 632.1  
##  3rd Qu.:2.879   3rd Qu.: 965   3rd Qu.:2.873   3rd Qu.: 827.5  
##  Max.   :3.014   Max.   :1520   Max.   :3.014   Max.   :1520.0  
##  NA's   :1       NA's   :1                                      
##      Time3         Intensity3    
##  Min.   :2.450   Min.   : 220.0  
##  1st Qu.:2.591   1st Qu.: 342.5  
##  Median :2.732   Median : 620.0  
##  Mean   :2.732   Mean   : 697.1  
##  3rd Qu.:2.873   3rd Qu.: 977.5  
##  Max.   :3.014   Max.   :1540.0  
##                                  
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(Bayer_3.2)
## [1] "Bayer_3.2"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.426   Min.   : 150.0   Min.   :2.450   Min.   : 130.0  
##  1st Qu.:2.591   1st Qu.: 297.5   1st Qu.:2.610   1st Qu.: 280.0  
##  Median :2.757   Median : 475.0   Median :2.769   Median : 430.0  
##  Mean   :2.757   Mean   : 622.9   Mean   :2.769   Mean   : 565.6  
##  3rd Qu.:2.922   3rd Qu.: 845.0   3rd Qu.:2.928   3rd Qu.: 775.0  
##  Max.   :3.087   Max.   :1540.0   Max.   :3.087   Max.   :1400.0  
##                                   NA's   :1       NA's   :1       
##      Time3         Intensity3    
##  Min.   :2.450   Min.   :  80.0  
##  1st Qu.:2.610   1st Qu.: 310.0  
##  Median :2.769   Median : 490.0  
##  Mean   :2.769   Mean   : 627.8  
##  3rd Qu.:2.928   3rd Qu.: 945.0  
##  Max.   :3.087   Max.   :1530.0  
##  NA's   :1       NA's   :1       
## 
## Duplicates:  0
##  NA Values:  4

peakanalyze(Bayer_3.3)
## [1] "Bayer_3.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.475   Min.   : 210.0   Min.   :2.450   Min.   : 230.0  
##  1st Qu.:2.604   1st Qu.: 350.0   1st Qu.:2.585   1st Qu.: 375.0  
##  Median :2.732   Median : 530.0   Median :2.720   Median : 510.0  
##  Mean   :2.732   Mean   : 693.2   Mean   :2.720   Mean   : 649.1  
##  3rd Qu.:2.861   3rd Qu.:1102.5   3rd Qu.:2.855   3rd Qu.: 925.0  
##  Max.   :2.990   Max.   :1470.0   Max.   :2.990   Max.   :1270.0  
##  NA's   :1       NA's   :1                                        
##      Time3         Intensity3    
##  Min.   :2.475   Min.   : 190.0  
##  1st Qu.:2.604   1st Qu.: 347.5  
##  Median :2.732   Median : 495.0  
##  Mean   :2.732   Mean   : 624.1  
##  3rd Qu.:2.861   3rd Qu.: 797.5  
##  Max.   :2.990   Max.   :1510.0  
##  NA's   :1       NA's   :1       
## 
## Duplicates:  0
##  NA Values:  4

## Perform within-group analysis of PV pills
peakanalyze(PV_3.1)
## [1] "PV_3.1"
##      Time1         Intensity1       Time2         Intensity2    
##  Min.   :2.475   Min.   : 180   Min.   :2.475   Min.   : 190.0  
##  1st Qu.:2.604   1st Qu.: 470   1st Qu.:2.604   1st Qu.: 400.0  
##  Median :2.732   Median :1055   Median :2.732   Median : 895.0  
##  Mean   :2.732   Mean   :1051   Mean   :2.732   Mean   : 933.2  
##  3rd Qu.:2.861   3rd Qu.:1388   3rd Qu.:2.861   3rd Qu.:1240.0  
##  Max.   :2.990   Max.   :2710   Max.   :2.990   Max.   :2570.0  
##      Time3         Intensity3    
##  Min.   :2.475   Min.   : 180.0  
##  1st Qu.:2.604   1st Qu.: 390.0  
##  Median :2.732   Median : 850.0  
##  Mean   :2.732   Mean   : 905.5  
##  3rd Qu.:2.861   3rd Qu.:1227.5  
##  Max.   :2.990   Max.   :1860.0  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(PV_3.2)
## [1] "PV_3.2"
##      Time1         Intensity1         Time2         Intensity2  
##  Min.   :2.475   Min.   : 270.0   Min.   :2.475   Min.   : 190  
##  1st Qu.:2.610   1st Qu.: 430.0   1st Qu.:2.610   1st Qu.: 390  
##  Median :2.744   Median : 760.0   Median :2.744   Median : 820  
##  Mean   :2.744   Mean   : 925.2   Mean   :2.744   Mean   : 827  
##  3rd Qu.:2.879   3rd Qu.:1380.0   3rd Qu.:2.879   3rd Qu.:1125  
##  Max.   :3.014   Max.   :2210.0   Max.   :3.014   Max.   :2100  
##                                                                 
##      Time3         Intensity3    
##  Min.   :2.499   Min.   : 220.0  
##  1st Qu.:2.628   1st Qu.: 495.0  
##  Median :2.757   Median : 885.0  
##  Mean   :2.757   Mean   : 899.5  
##  3rd Qu.:2.885   3rd Qu.:1062.5  
##  Max.   :3.014   Max.   :2110.0  
##  NA's   :1       NA's   :1       
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(PV_3.3)
## [1] "PV_3.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.499   Min.   : 140.0   Min.   :2.499   Min.   : 290.0  
##  1st Qu.:2.622   1st Qu.: 440.0   1st Qu.:2.622   1st Qu.: 460.0  
##  Median :2.744   Median : 730.0   Median :2.744   Median : 910.0  
##  Mean   :2.744   Mean   : 832.9   Mean   :2.744   Mean   : 937.1  
##  3rd Qu.:2.867   3rd Qu.:1240.0   3rd Qu.:2.867   3rd Qu.:1310.0  
##  Max.   :2.990   Max.   :1790.0   Max.   :2.990   Max.   :2090.0  
##  NA's   :1       NA's   :1        NA's   :1       NA's   :1       
##      Time3         Intensity3    
##  Min.   :2.475   Min.   : 280.0  
##  1st Qu.:2.604   1st Qu.: 437.5  
##  Median :2.732   Median : 840.0  
##  Mean   :2.732   Mean   : 878.2  
##  3rd Qu.:2.861   3rd Qu.:1217.5  
##  Max.   :2.990   Max.   :2250.0  
##                                  
## 
## Duplicates:  0
##  NA Values:  4

## Perform within-group analysis of WAL pills.
peakanalyze(WAL_3.1)
## [1] "WAL_3.1"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.450   Min.   : 180.0   Min.   :2.450   Min.   : 150.0  
##  1st Qu.:2.591   1st Qu.: 347.5   1st Qu.:2.591   1st Qu.: 322.5  
##  Median :2.732   Median : 600.0   Median :2.732   Median : 555.0  
##  Mean   :2.732   Mean   : 660.4   Mean   :2.732   Mean   : 650.8  
##  3rd Qu.:2.873   3rd Qu.: 945.0   3rd Qu.:2.873   3rd Qu.: 970.0  
##  Max.   :3.014   Max.   :1550.0   Max.   :3.014   Max.   :1620.0  
##                                                                   
##      Time3         Intensity3    
##  Min.   :2.475   Min.   : 120.0  
##  1st Qu.:2.610   1st Qu.: 325.0  
##  Median :2.744   Median : 560.0  
##  Mean   :2.744   Mean   : 626.5  
##  3rd Qu.:2.879   3rd Qu.: 875.0  
##  Max.   :3.014   Max.   :1550.0  
##  NA's   :1       NA's   :1       
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(WAL_3.2)
## [1] "WAL_3.2"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.475   Min.   : 140.0   Min.   :2.475   Min.   : 200.0  
##  1st Qu.:2.610   1st Qu.: 410.0   1st Qu.:2.610   1st Qu.: 375.0  
##  Median :2.744   Median : 850.0   Median :2.744   Median : 650.0  
##  Mean   :2.744   Mean   : 861.3   Mean   :2.744   Mean   : 721.3  
##  3rd Qu.:2.879   3rd Qu.:1245.0   3rd Qu.:2.879   3rd Qu.:1040.0  
##  Max.   :3.014   Max.   :2110.0   Max.   :3.014   Max.   :1700.0  
##      Time3         Intensity3  
##  Min.   :2.475   Min.   : 310  
##  1st Qu.:2.610   1st Qu.: 410  
##  Median :2.744   Median : 800  
##  Mean   :2.744   Mean   : 847  
##  3rd Qu.:2.879   3rd Qu.:1255  
##  Max.   :3.014   Max.   :1620  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(WAL_3.3)
## [1] "WAL_3.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.450   Min.   : 180.0   Min.   :2.450   Min.   : 220.0  
##  1st Qu.:2.591   1st Qu.: 317.5   1st Qu.:2.591   1st Qu.: 452.5  
##  Median :2.732   Median : 655.0   Median :2.732   Median : 690.0  
##  Mean   :2.732   Mean   : 746.2   Mean   :2.732   Mean   : 778.8  
##  3rd Qu.:2.873   3rd Qu.:1040.0   3rd Qu.:2.873   3rd Qu.:1197.5  
##  Max.   :3.014   Max.   :1590.0   Max.   :3.014   Max.   :1610.0  
##                                                                   
##      Time3         Intensity3  
##  Min.   :2.475   Min.   : 180  
##  1st Qu.:2.610   1st Qu.: 395  
##  Median :2.744   Median : 630  
##  Mean   :2.744   Mean   : 757  
##  3rd Qu.:2.879   3rd Qu.:1060  
##  Max.   :3.014   Max.   :1500  
##  NA's   :1       NA's   :1     
## 
## Duplicates:  0
##  NA Values:  2

## Perform between-group analysis of 136.5 92.90 peaks
bet_group_line(Bayer_3.1, PV_3.1,WAL_3.1)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_3.2, PV_3.2,WAL_3.2)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_3.3, PV_3.3,WAL_3.3)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

between_groups(PV_3.1,PV_3.2,PV_3.3,WAL_3.1,WAL_3.2,WAL_3.3,Bayer_3.1,Bayer_3.2,
               Bayer_3.3)
## [1] "Between Group Summary: Bayer, PV, WAL"
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Brands       2 103209   51605   14.04 0.00545 **
## Residuals    6  22049    3675                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## [1] "Tukey HSD Test:"
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = AUP ~ Brands)
## 
## $Brands
##                 diff        lwr       upr     p adj
## PV-Bayer   258.66695  106.80000 410.53389 0.0047225
## WAL-Bayer   91.60997  -60.25698 243.47691 0.2326222
## WAL-PV    -167.05698 -318.92393 -15.19004 0.0344488

Bayer - Pill 1 intensity2 has an AUC different than other two and appears different in line plot. Pill 2 intensity2 has narrower distribution than other two. Pill 3 intensity3 has much lower AUC and appears different in line plot. Outlier in pill 3. PV - At least one AUC is significantly higher than the other two in all three pills. Intensity1 appears different in pills 1 and 2. Pill2 intensity1 has wider distribution that is slightly skewed. Outliers in pills 1 and 2. WAL - In pills 1 and 2, AUCs show at least one value significantly lower than other two.

Between group ANOVA - In line plot for first pills, Bayer looks significantly different than other two. Other two plots show distinct differences in all three. Between group ANOVA shows a p-value of 00545. We can accept the alt hypothesis, at least one groups is different. TukeyHSD shows PV-Bayer and WAL-PV have distinct differences. QQplot shows residuals fit line well. Residuals vs fitted shows a pretty linear fit and no distinct patterns.

Bayer_4.1 <- read_excel('199.10 92.90.xlsx', sheet = 1)
Bayer_4.2 <- read_excel('199.10 92.90.xlsx', sheet = 2)
Bayer_4.3 <- read_excel('199.10 92.90.xlsx', sheet = 3)
PV_4.1 <- read_excel('199.10 92.90.xlsx', sheet = 4)
PV_4.2 <- read_excel('199.10 92.90.xlsx', sheet = 5)
PV_4.3 <- read_excel('199.10 92.90.xlsx', sheet = 6)
WAL_4.1 <- read_excel('199.10 92.90.xlsx', sheet = 7)
WAL_4.2 <- read_excel('199.10 92.90.xlsx', sheet = 8)
WAL_4.3 <- read_excel('199.10 92.90.xlsx', sheet = 9)

## Perform within-group analysis of Bayer pills. 
peakanalyze(Bayer_4.1)
## [1] "Bayer_4.1"
##      Time1         Intensity1       Time2         Intensity2    
##  Min.   :2.426   Min.   : 160   Min.   :2.450   Min.   : 240.0  
##  1st Qu.:2.585   1st Qu.: 430   1st Qu.:2.604   1st Qu.: 397.5  
##  Median :2.744   Median : 670   Median :2.757   Median : 635.0  
##  Mean   :2.744   Mean   : 950   Mean   :2.757   Mean   : 847.7  
##  3rd Qu.:2.904   3rd Qu.:1490   3rd Qu.:2.910   3rd Qu.:1120.0  
##  Max.   :3.063   Max.   :2440   Max.   :3.063   Max.   :2220.0  
##  NA's   :1       NA's   :1      NA's   :2       NA's   :2       
##      Time3         Intensity3    
##  Min.   :2.401   Min.   : 110.0  
##  1st Qu.:2.567   1st Qu.: 430.0  
##  Median :2.732   Median : 760.0  
##  Mean   :2.732   Mean   : 946.1  
##  3rd Qu.:2.898   3rd Qu.:1407.5  
##  Max.   :3.063   Max.   :2380.0  
##                                  
## 
## Duplicates:  0
##  NA Values:  6

peakanalyze(Bayer_4.2)
## [1] "Bayer_4.2"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.426   Min.   :  80.0   Min.   :2.426   Min.   :  90.0  
##  1st Qu.:2.610   1st Qu.: 290.0   1st Qu.:2.610   1st Qu.: 265.0  
##  Median :2.793   Median : 650.0   Median :2.793   Median : 560.0  
##  Mean   :2.793   Mean   : 765.2   Mean   :2.793   Mean   : 717.1  
##  3rd Qu.:2.977   3rd Qu.:1050.0   3rd Qu.:2.977   3rd Qu.:1085.0  
##  Max.   :3.161   Max.   :2090.0   Max.   :3.161   Max.   :2100.0  
##      Time3         Intensity3    
##  Min.   :2.426   Min.   :  70.0  
##  1st Qu.:2.610   1st Qu.: 270.0  
##  Median :2.793   Median : 570.0  
##  Mean   :2.793   Mean   : 716.5  
##  3rd Qu.:2.977   3rd Qu.: 965.0  
##  Max.   :3.161   Max.   :2150.0  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(Bayer_4.3)
## [1] "Bayer_4.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.450   Min.   : 200.0   Min.   :2.450   Min.   : 120.0  
##  1st Qu.:2.591   1st Qu.: 412.5   1st Qu.:2.591   1st Qu.: 470.0  
##  Median :2.732   Median : 730.0   Median :2.732   Median : 725.0  
##  Mean   :2.732   Mean   : 905.8   Mean   :2.732   Mean   : 880.4  
##  3rd Qu.:2.873   3rd Qu.:1212.5   3rd Qu.:2.873   3rd Qu.:1192.5  
##  Max.   :3.014   Max.   :2150.0   Max.   :3.014   Max.   :2170.0  
##  NA's   :2       NA's   :2        NA's   :2       NA's   :2       
##      Time3         Intensity3    
##  Min.   :2.401   Min.   : 160.0  
##  1st Qu.:2.555   1st Qu.: 400.0  
##  Median :2.708   Median : 625.0  
##  Mean   :2.708   Mean   : 814.6  
##  3rd Qu.:2.861   3rd Qu.:1115.0  
##  Max.   :3.014   Max.   :1920.0  
##                                  
## 
## Duplicates:  0
##  NA Values:  8

## Perform within-group analysis of PV pills
peakanalyze(PV_4.1)
## [1] "PV_4.1"
##      Time1         Intensity1       Time2         Intensity2       Time3      
##  Min.   :2.450   Min.   : 140   Min.   :2.450   Min.   :  50   Min.   :2.450  
##  1st Qu.:2.610   1st Qu.: 265   1st Qu.:2.610   1st Qu.: 365   1st Qu.:2.610  
##  Median :2.769   Median :1230   Median :2.769   Median :1310   Median :2.769  
##  Mean   :2.769   Mean   :1299   Mean   :2.769   Mean   :1194   Mean   :2.769  
##  3rd Qu.:2.928   3rd Qu.:1885   3rd Qu.:2.928   3rd Qu.:1810   3rd Qu.:2.928  
##  Max.   :3.087   Max.   :4410   Max.   :3.087   Max.   :3490   Max.   :3.087  
##    Intensity3  
##  Min.   : 140  
##  1st Qu.: 310  
##  Median :1120  
##  Mean   :1129  
##  3rd Qu.:1695  
##  Max.   :3110  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(PV_4.2)
## [1] "PV_4.2"
##      Time1         Intensity1       Time2         Intensity2    
##  Min.   :2.475   Min.   : 260   Min.   :2.450   Min.   : 180.0  
##  1st Qu.:2.610   1st Qu.: 520   1st Qu.:2.591   1st Qu.: 482.5  
##  Median :2.744   Median :1190   Median :2.732   Median :1055.0  
##  Mean   :2.744   Mean   :1310   Mean   :2.732   Mean   :1250.0  
##  3rd Qu.:2.879   3rd Qu.:1975   3rd Qu.:2.873   3rd Qu.:2045.0  
##  Max.   :3.014   Max.   :2790   Max.   :3.014   Max.   :2770.0  
##  NA's   :1       NA's   :1                                      
##      Time3         Intensity3  
##  Min.   :2.450   Min.   : 190  
##  1st Qu.:2.591   1st Qu.: 450  
##  Median :2.732   Median :1065  
##  Mean   :2.732   Mean   :1155  
##  3rd Qu.:2.873   3rd Qu.:1748  
##  Max.   :3.014   Max.   :2840  
##                                
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(PV_4.3)
## [1] "PV_4.3"
##      Time1         Intensity1       Time2         Intensity2       Time3      
##  Min.   :2.450   Min.   : 250   Min.   :2.475   Min.   : 170   Min.   :2.475  
##  1st Qu.:2.591   1st Qu.: 505   1st Qu.:2.610   1st Qu.: 495   1st Qu.:2.610  
##  Median :2.732   Median :1050   Median :2.744   Median :1140   Median :2.744  
##  Mean   :2.732   Mean   :1140   Mean   :2.744   Mean   :1210   Mean   :2.744  
##  3rd Qu.:2.873   3rd Qu.:1760   3rd Qu.:2.879   3rd Qu.:1895   3rd Qu.:2.879  
##  Max.   :3.014   Max.   :2860   Max.   :3.014   Max.   :2300   Max.   :3.014  
##                                 NA's   :1       NA's   :1      NA's   :1      
##    Intensity3  
##  Min.   : 240  
##  1st Qu.: 540  
##  Median :1090  
##  Mean   :1263  
##  3rd Qu.:1705  
##  Max.   :3690  
##  NA's   :1     
## 
## Duplicates:  0
##  NA Values:  4

## Perform within-group analysis of WAL pills.
peakanalyze(WAL_4.1)
## [1] "WAL_4.1"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.450   Min.   : 230.0   Min.   :2.450   Min.   : 200.0  
##  1st Qu.:2.591   1st Qu.: 375.0   1st Qu.:2.591   1st Qu.: 370.0  
##  Median :2.732   Median : 975.0   Median :2.732   Median : 790.0  
##  Mean   :2.732   Mean   : 981.2   Mean   :2.732   Mean   : 919.2  
##  3rd Qu.:2.873   3rd Qu.:1572.5   3rd Qu.:2.873   3rd Qu.:1390.0  
##  Max.   :3.014   Max.   :1950.0   Max.   :3.014   Max.   :2250.0  
##      Time3         Intensity3    
##  Min.   :2.450   Min.   : 110.0  
##  1st Qu.:2.591   1st Qu.: 480.0  
##  Median :2.732   Median : 725.0  
##  Mean   :2.732   Mean   : 872.1  
##  3rd Qu.:2.873   3rd Qu.:1337.5  
##  Max.   :3.014   Max.   :2210.0  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(WAL_4.2)
## [1] "WAL_4.2"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.426   Min.   :  80.0   Min.   :2.426   Min.   : 110.0  
##  1st Qu.:2.591   1st Qu.: 357.5   1st Qu.:2.591   1st Qu.: 362.5  
##  Median :2.757   Median : 950.0   Median :2.757   Median : 805.0  
##  Mean   :2.757   Mean   :1013.9   Mean   :2.757   Mean   : 936.4  
##  3rd Qu.:2.922   3rd Qu.:1577.5   3rd Qu.:2.922   3rd Qu.:1527.5  
##  Max.   :3.087   Max.   :2530.0   Max.   :3.087   Max.   :2510.0  
##      Time3         Intensity3    
##  Min.   :2.426   Min.   : 130.0  
##  1st Qu.:2.591   1st Qu.: 397.5  
##  Median :2.757   Median : 830.0  
##  Mean   :2.757   Mean   : 995.4  
##  3rd Qu.:2.922   3rd Qu.:1540.0  
##  Max.   :3.087   Max.   :2490.0  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(WAL_4.3)
## [1] "WAL_4.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.450   Min.   : 200.0   Min.   :2.450   Min.   : 180.0  
##  1st Qu.:2.604   1st Qu.: 452.5   1st Qu.:2.604   1st Qu.: 417.5  
##  Median :2.757   Median : 930.0   Median :2.757   Median : 755.0  
##  Mean   :2.757   Mean   :1050.0   Mean   :2.757   Mean   :1011.9  
##  3rd Qu.:2.910   3rd Qu.:1702.5   3rd Qu.:2.910   3rd Qu.:1667.5  
##  Max.   :3.063   Max.   :2350.0   Max.   :3.063   Max.   :2620.0  
##      Time3         Intensity3    
##  Min.   :2.450   Min.   : 150.0  
##  1st Qu.:2.604   1st Qu.: 392.5  
##  Median :2.757   Median : 720.0  
##  Mean   :2.757   Mean   : 955.8  
##  3rd Qu.:2.910   3rd Qu.:1647.5  
##  Max.   :3.063   Max.   :2080.0  
## 
## Duplicates:  0
##  NA Values:  0

## Perform between-group analysis of 136.5 92.90 peaks
bet_group_line(Bayer_4.1, PV_4.1,WAL_4.1)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Warning: Removed 2 row(s) containing missing values (geom_path).

bet_group_line(Bayer_4.2, PV_4.2,WAL_4.2)
## Warning: Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_4.3, PV_4.3,WAL_4.3)
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Removed 2 row(s) containing missing values (geom_path).
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

between_groups(PV_4.1,PV_4.2,PV_4.3,WAL_4.1,WAL_4.2,WAL_4.3,Bayer_4.1,Bayer_4.2,
               Bayer_4.3)
## [1] "Between Group Summary: Bayer, PV, WAL"
##             Df Sum Sq Mean Sq F value Pr(>F)   
## Brands       2 181816   90908   22.64 0.0016 **
## Residuals    6  24092    4015                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## [1] "Tukey HSD Test:"
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = AUP ~ Brands)
## 
## $Brands
##                diff        lwr       upr     p adj
## PV-Bayer   345.0714  186.32314 503.81968 0.0013388
## WAL-Bayer  132.5075  -26.24074 291.25580 0.0944411
## WAL-PV    -212.5639 -371.31215 -53.81561 0.0148459

Bayer - Pill 1 intensity1 looks different in line plot. Pill 1 intensity 2 AUC is much lower than other two. AUC for pill 2 intensity1 is much higher than other two. Line plots for pills 2 and 3 look similar. PV - Line plots look similar throughout all three pills. Outliers present in two pills. Skewed distributions for all in pill 1 WAL: - Pill 1 intensity 1 appears different in line plot. Pill 3 Intensity 3 AUC is much lower than the other two.

Betweeen group ANOVA - PV looks different from other two brands in line plot 1 and 2. Bayer is lower than other two in line plot 2. Between group AOV returns a p-value of 0.0016. We can accept the alt hypothesis and conclude at least one of the groups is different. TukeyHSD shows that PV-Bayer and WAL-PV are different. QQplot shows residuals fit line well and residuals vs fitted shows a very small non linear trend. However, there are no patterns.

Bayer_5.1 <- read_excel('199.10 137.00.xlsx', sheet = 1)
Bayer_5.2 <- read_excel('199.10 137.00.xlsx', sheet = 2)
Bayer_5.3 <- read_excel('199.10 137.00.xlsx', sheet = 3)
PV_5.1 <- read_excel('199.10 137.00.xlsx', sheet = 4)
PV_5.2 <- read_excel('199.10 137.00.xlsx', sheet = 5)
PV_5.3 <- read_excel('199.10 137.00.xlsx', sheet = 6)
WAL_5.1 <- read_excel('199.10 137.00.xlsx', sheet = 7)
WAL_5.2 <- read_excel('199.10 137.00.xlsx', sheet = 8)
WAL_5.3 <- read_excel('199.10 137.00.xlsx', sheet = 9)

## Perform within-group analysis of Bayer pills. 
peakanalyze(Bayer_5.1)
## [1] "Bayer_5.1"
##      Time1         Intensity1       Time2         Intensity2       Time3      
##  Min.   :2.450   Min.   : 200   Min.   :2.450   Min.   : 190   Min.   :2.426  
##  1st Qu.:2.622   1st Qu.: 550   1st Qu.:2.622   1st Qu.: 530   1st Qu.:2.604  
##  Median :2.793   Median : 900   Median :2.793   Median : 850   Median :2.781  
##  Mean   :2.793   Mean   :1090   Mean   :2.793   Mean   :1075   Mean   :2.781  
##  3rd Qu.:2.965   3rd Qu.:1650   3rd Qu.:2.965   3rd Qu.:1660   3rd Qu.:2.959  
##  Max.   :3.136   Max.   :2370   Max.   :3.136   Max.   :2710   Max.   :3.136  
##  NA's   :1       NA's   :1      NA's   :1       NA's   :1                     
##    Intensity3  
##  Min.   : 190  
##  1st Qu.: 490  
##  Median : 905  
##  Mean   :1100  
##  3rd Qu.:1695  
##  Max.   :2540  
##                
## 
## Duplicates:  0
##  NA Values:  4

peakanalyze(Bayer_5.2)
## [1] "Bayer_5.2"
##      Time1         Intensity1       Time2         Intensity2    
##  Min.   :2.450   Min.   : 300   Min.   :2.450   Min.   : 390.0  
##  1st Qu.:2.591   1st Qu.: 615   1st Qu.:2.591   1st Qu.: 602.5  
##  Median :2.732   Median :1090   Median :2.732   Median :1010.0  
##  Mean   :2.732   Mean   :1308   Mean   :2.732   Mean   :1230.4  
##  3rd Qu.:2.873   3rd Qu.:2010   3rd Qu.:2.873   3rd Qu.:1725.0  
##  Max.   :3.014   Max.   :2940   Max.   :3.014   Max.   :2910.0  
##      Time3         Intensity3  
##  Min.   :2.450   Min.   : 400  
##  1st Qu.:2.591   1st Qu.: 700  
##  Median :2.732   Median : 970  
##  Mean   :2.732   Mean   :1240  
##  3rd Qu.:2.873   3rd Qu.:1715  
##  Max.   :3.014   Max.   :2670  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(Bayer_5.3)
## [1] "Bayer_5.3"
##      Time1         Intensity1       Time2         Intensity2       Time3      
##  Min.   :2.426   Min.   : 170   Min.   :2.426   Min.   : 150   Min.   :2.450  
##  1st Qu.:2.597   1st Qu.: 400   1st Qu.:2.597   1st Qu.: 420   1st Qu.:2.616  
##  Median :2.769   Median : 760   Median :2.769   Median : 800   Median :2.781  
##  Mean   :2.769   Mean   :1003   Mean   :2.769   Mean   :1063   Mean   :2.781  
##  3rd Qu.:2.941   3rd Qu.:1470   3rd Qu.:2.941   3rd Qu.:1540   3rd Qu.:2.947  
##  Max.   :3.112   Max.   :2670   Max.   :3.112   Max.   :2810   Max.   :3.112  
##                                                                NA's   :1      
##    Intensity3    
##  Min.   : 120.0  
##  1st Qu.: 457.5  
##  Median : 755.0  
##  Mean   : 984.6  
##  3rd Qu.:1290.0  
##  Max.   :2810.0  
##  NA's   :1       
## 
## Duplicates:  0
##  NA Values:  2

## Perform within-group analysis of PV pills
peakanalyze(PV_5.1)
## [1] "PV_5.1"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.450   Min.   : 140.0   Min.   :2.450   Min.   : 230.0  
##  1st Qu.:2.616   1st Qu.: 492.5   1st Qu.:2.616   1st Qu.: 497.5  
##  Median :2.781   Median :1340.0   Median :2.781   Median :1475.0  
##  Mean   :2.781   Mean   :1543.2   Mean   :2.781   Mean   :1529.3  
##  3rd Qu.:2.947   3rd Qu.:2402.5   3rd Qu.:2.947   3rd Qu.:2157.5  
##  Max.   :3.112   Max.   :4720.0   Max.   :3.112   Max.   :4320.0  
##      Time3         Intensity3  
##  Min.   :2.450   Min.   : 130  
##  1st Qu.:2.616   1st Qu.: 510  
##  Median :2.781   Median :1230  
##  Mean   :2.781   Mean   :1445  
##  3rd Qu.:2.947   3rd Qu.:2258  
##  Max.   :3.112   Max.   :3770  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(PV_5.2)
## [1] "PV_5.2"
##      Time1         Intensity1       Time2         Intensity2       Time3      
##  Min.   :2.475   Min.   : 350   Min.   :2.450   Min.   : 350   Min.   :2.475  
##  1st Qu.:2.610   1st Qu.: 695   1st Qu.:2.591   1st Qu.: 640   1st Qu.:2.610  
##  Median :2.744   Median :1580   Median :2.732   Median :1380   Median :2.744  
##  Mean   :2.744   Mean   :1618   Mean   :2.732   Mean   :1528   Mean   :2.744  
##  3rd Qu.:2.879   3rd Qu.:2215   3rd Qu.:2.873   3rd Qu.:2105   3rd Qu.:2.879  
##  Max.   :3.014   Max.   :4550   Max.   :3.014   Max.   :4580   Max.   :3.014  
##  NA's   :1       NA's   :1                                     NA's   :1      
##    Intensity3  
##  Min.   : 340  
##  1st Qu.: 715  
##  Median :1200  
##  Mean   :1589  
##  3rd Qu.:2120  
##  Max.   :3660  
##  NA's   :1     
## 
## Duplicates:  0
##  NA Values:  4

peakanalyze(PV_5.3)
## [1] "PV_5.3"
##      Time1         Intensity1       Time2         Intensity2    
##  Min.   :2.475   Min.   : 430   Min.   :2.450   Min.   : 330.0  
##  1st Qu.:2.610   1st Qu.: 655   1st Qu.:2.591   1st Qu.: 612.5  
##  Median :2.744   Median :1360   Median :2.732   Median :1345.0  
##  Mean   :2.744   Mean   :1469   Mean   :2.732   Mean   :1526.7  
##  3rd Qu.:2.879   3rd Qu.:2155   3rd Qu.:2.873   3rd Qu.:2317.5  
##  Max.   :3.014   Max.   :3380   Max.   :3.014   Max.   :4210.0  
##  NA's   :2       NA's   :2      NA's   :1       NA's   :1       
##      Time3         Intensity3  
##  Min.   :2.426   Min.   : 320  
##  1st Qu.:2.573   1st Qu.: 650  
##  Median :2.720   Median :1320  
##  Mean   :2.720   Mean   :1503  
##  3rd Qu.:2.867   3rd Qu.:2260  
##  Max.   :3.014   Max.   :3930  
##                                
## 
## Duplicates:  0
##  NA Values:  6

## Perform within-group analysis of WAL pills.
peakanalyze(WAL_5.1)
## [1] "WAL_5.1"
##      Time1         Intensity1       Time2         Intensity2       Time3      
##  Min.   :2.450   Min.   : 330   Min.   :2.450   Min.   : 240   Min.   :2.450  
##  1st Qu.:2.591   1st Qu.: 645   1st Qu.:2.591   1st Qu.: 570   1st Qu.:2.591  
##  Median :2.732   Median :1035   Median :2.732   Median : 925   Median :2.732  
##  Mean   :2.732   Mean   :1306   Mean   :2.732   Mean   :1117   Mean   :2.732  
##  3rd Qu.:2.873   3rd Qu.:1840   3rd Qu.:2.873   3rd Qu.:1670   3rd Qu.:2.873  
##  Max.   :3.014   Max.   :2840   Max.   :3.014   Max.   :2390   Max.   :3.014  
##    Intensity3    
##  Min.   : 270.0  
##  1st Qu.: 587.5  
##  Median :1150.0  
##  Mean   :1230.4  
##  3rd Qu.:1910.0  
##  Max.   :2250.0  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(WAL_5.2)
## [1] "WAL_5.2"
##      Time1         Intensity1         Time2         Intensity2  
##  Min.   :2.426   Min.   : 380.0   Min.   :2.450   Min.   : 340  
##  1st Qu.:2.579   1st Qu.: 622.5   1st Qu.:2.597   1st Qu.: 670  
##  Median :2.732   Median :1200.0   Median :2.744   Median :1100  
##  Mean   :2.732   Mean   :1423.1   Mean   :2.744   Mean   :1336  
##  3rd Qu.:2.885   3rd Qu.:2050.0   3rd Qu.:2.892   3rd Qu.:1960  
##  Max.   :3.038   Max.   :4000.0   Max.   :3.038   Max.   :2750  
##                                   NA's   :1       NA's   :1     
##      Time3         Intensity3  
##  Min.   :2.426   Min.   : 220  
##  1st Qu.:2.579   1st Qu.: 640  
##  Median :2.732   Median :1220  
##  Mean   :2.732   Mean   :1349  
##  3rd Qu.:2.885   3rd Qu.:1760  
##  Max.   :3.038   Max.   :3170  
##                                
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(WAL_5.3)
## [1] "WAL_5.3"
##      Time1         Intensity1       Time2         Intensity2       Time3      
##  Min.   :2.426   Min.   : 400   Min.   :2.426   Min.   : 290   Min.   :2.426  
##  1st Qu.:2.573   1st Qu.: 630   1st Qu.:2.573   1st Qu.: 580   1st Qu.:2.573  
##  Median :2.720   Median :1400   Median :2.720   Median :1110   Median :2.720  
##  Mean   :2.720   Mean   :1448   Mean   :2.720   Mean   :1418   Mean   :2.720  
##  3rd Qu.:2.867   3rd Qu.:2110   3rd Qu.:2.867   3rd Qu.:2130   3rd Qu.:2.867  
##  Max.   :3.014   Max.   :2950   Max.   :3.014   Max.   :3250   Max.   :3.014  
##    Intensity3  
##  Min.   : 280  
##  1st Qu.: 610  
##  Median :1080  
##  Mean   :1330  
##  3rd Qu.:2070  
##  Max.   :2610  
## 
## Duplicates:  0
##  NA Values:  0

## Perform between-group analysis of 136.5 92.90 peaks
bet_group_line(Bayer_5.1, PV_5.1,WAL_5.1)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_5.2, PV_5.2,WAL_5.2)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_5.3, PV_5.3,WAL_5.3)
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

between_groups(PV_5.1,PV_5.2,PV_5.3,WAL_5.1,WAL_5.2,WAL_5.3,Bayer_5.1,Bayer_5.2,
               Bayer_5.3)
## [1] "Between Group Summary: Bayer, PV, WAL"
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Brands       2 229420  114710   13.67 0.00582 **
## Residuals    6  50334    8389                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## [1] "Tukey HSD Test:"
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = AUP ~ Brands)
## 
## $Brands
##                diff       lwr       upr     p adj
## PV-Bayer   390.8435  161.3843 620.30266 0.0047214
## WAL-Bayer  207.2880  -22.1712 436.74716 0.0723347
## WAL-PV    -183.5555 -413.0147  45.90368 0.1081789

Bayer - Outlier in pill 3. Line plots look relatively similar. AUCs are similar. PV - Outliers in pill 2. Pill 3 intensity 1 looks different from other two. AUCs are similar. WAL - Intensity1 looks different in pills 1 and 2. AUCs are similar for all three pills.

Between group ANOVA - PV is different in line plot 1. Plots 2 and 3, all three brands look similar. Between group AOV shows a p-value of 0.00582. We can accept the alt hypothesis and conclude that at least one group is different. TukeyHSD shows that PV-Bayer and WAL-Bayer are different. QQplot shows a slight lower tail. Residuals vs fitted shows a non-linear trend. However, there is no pattern.

Bayer_6.1 <- read_excel('240.00 92.900.xlsx', sheet = 1)
Bayer_6.2 <- read_excel('240.00 92.900.xlsx', sheet = 2)
Bayer_6.3 <- read_excel('240.00 92.900.xlsx', sheet = 3)
PV_6.1 <- read_excel('240.00 92.900.xlsx', sheet = 4)
PV_6.2 <- read_excel('240.00 92.900.xlsx', sheet = 5)
PV_6.3 <- read_excel('240.00 92.900.xlsx', sheet = 6)
WAL_6.1 <- read_excel('240.00 92.900.xlsx', sheet = 7)
WAL_6.2 <- read_excel('240.00 92.900.xlsx', sheet = 8)
WAL_6.3 <- read_excel('240.00 92.900.xlsx', sheet = 9)

## Perform within-group analysis of Bayer pills. 
peakanalyze(Bayer_6.1)
## [1] "Bayer_6.1"
##      Time1         Intensity1      Time2         Intensity2        Time3      
##  Min.   :2.426   Min.   : 10   Min.   :2.377   Min.   : 10.0   Min.   :2.401  
##  1st Qu.:2.597   1st Qu.: 90   1st Qu.:2.561   1st Qu.: 85.0   1st Qu.:2.579  
##  Median :2.769   Median :140   Median :2.744   Median :120.0   Median :2.757  
##  Mean   :2.769   Mean   :189   Mean   :2.744   Mean   :175.8   Mean   :2.757  
##  3rd Qu.:2.941   3rd Qu.:240   3rd Qu.:2.928   3rd Qu.:230.0   3rd Qu.:2.934  
##  Max.   :3.112   Max.   :820   Max.   :3.112   Max.   :590.0   Max.   :3.112  
##  NA's   :2       NA's   :2                                     NA's   :1      
##    Intensity3   
##  Min.   : 20.0  
##  1st Qu.: 70.0  
##  Median :130.0  
##  Mean   :162.0  
##  3rd Qu.:227.5  
##  Max.   :460.0  
##  NA's   :1      
## 
## Duplicates:  0
##  NA Values:  6

peakanalyze(Bayer_6.2)
## [1] "Bayer_6.2"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.450   Min.   : 10.0   Min.   :2.450   Min.   : 20.0  
##  1st Qu.:2.616   1st Qu.: 90.0   1st Qu.:2.616   1st Qu.: 70.0  
##  Median :2.781   Median :120.0   Median :2.781   Median :120.0  
##  Mean   :2.781   Mean   :177.9   Mean   :2.781   Mean   :172.1  
##  3rd Qu.:2.947   3rd Qu.:237.5   3rd Qu.:2.947   3rd Qu.:212.5  
##  Max.   :3.112   Max.   :520.0   Max.   :3.112   Max.   :680.0  
##      Time3         Intensity3   
##  Min.   :2.426   Min.   : 10.0  
##  1st Qu.:2.591   1st Qu.: 90.0  
##  Median :2.757   Median :135.0  
##  Mean   :2.768   Mean   :184.3  
##  3rd Qu.:2.947   3rd Qu.:260.0  
##  Max.   :3.112   Max.   :560.0  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(Bayer_6.3)
## [1] "Bayer_6.3"
##      Time1         Intensity1        Time2         Intensity2      Time3      
##  Min.   :2.450   Min.   : 30.0   Min.   :2.450   Min.   : 30   Min.   :2.401  
##  1st Qu.:2.610   1st Qu.: 80.0   1st Qu.:2.610   1st Qu.: 75   1st Qu.:2.573  
##  Median :2.769   Median :120.0   Median :2.769   Median :150   Median :2.744  
##  Mean   :2.769   Mean   :165.9   Mean   :2.769   Mean   :183   Mean   :2.744  
##  3rd Qu.:2.928   3rd Qu.:180.0   3rd Qu.:2.928   3rd Qu.:235   3rd Qu.:2.916  
##  Max.   :3.087   Max.   :540.0   Max.   :3.087   Max.   :610   Max.   :3.087  
##  NA's   :2       NA's   :2       NA's   :2       NA's   :2                    
##    Intensity3   
##  Min.   : 10.0  
##  1st Qu.: 50.0  
##  Median : 90.0  
##  Mean   :168.3  
##  3rd Qu.:240.0  
##  Max.   :770.0  
##                 
## 
## Duplicates:  0
##  NA Values:  8

## Perform within-group analysis of PV pills
peakanalyze(PV_6.1)
## [1] "PV_6.1"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.499   Min.   :110.0   Min.   :2.426   Min.   : 50.0  
##  1st Qu.:2.628   1st Qu.:170.0   1st Qu.:2.573   1st Qu.:140.0  
##  Median :2.757   Median :255.0   Median :2.720   Median :200.0  
##  Mean   :2.757   Mean   :306.4   Mean   :2.720   Mean   :258.8  
##  3rd Qu.:2.885   3rd Qu.:427.5   3rd Qu.:2.867   3rd Qu.:310.0  
##  Max.   :3.014   Max.   :760.0   Max.   :3.014   Max.   :730.0  
##  NA's   :3       NA's   :3                                      
##      Time3         Intensity3   
##  Min.   :2.475   Min.   : 60.0  
##  1st Qu.:2.610   1st Qu.:145.0  
##  Median :2.744   Median :200.0  
##  Mean   :2.744   Mean   :272.6  
##  3rd Qu.:2.879   3rd Qu.:355.0  
##  Max.   :3.014   Max.   :790.0  
##  NA's   :2       NA's   :2      
## 
## Duplicates:  0
##  NA Values:  10

peakanalyze(PV_6.2)
## [1] "PV_6.2"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.450   Min.   : 30.0   Min.   :2.426   Min.   : 30.0  
##  1st Qu.:2.604   1st Qu.:142.5   1st Qu.:2.585   1st Qu.:125.0  
##  Median :2.757   Median :210.0   Median :2.744   Median :180.0  
##  Mean   :2.757   Mean   :280.0   Mean   :2.744   Mean   :243.7  
##  3rd Qu.:2.910   3rd Qu.:320.0   3rd Qu.:2.904   3rd Qu.:265.0  
##  Max.   :3.063   Max.   :890.0   Max.   :3.063   Max.   :740.0  
##  NA's   :1       NA's   :1                                      
##      Time3         Intensity3   
##  Min.   :2.426   Min.   : 20.0  
##  1st Qu.:2.585   1st Qu.:125.0  
##  Median :2.744   Median :200.0  
##  Mean   :2.744   Mean   :248.5  
##  3rd Qu.:2.904   3rd Qu.:275.0  
##  Max.   :3.063   Max.   :870.0  
##                                 
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(PV_6.3)
## [1] "PV_6.3"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.475   Min.   : 40.0   Min.   :2.426   Min.   : 40.0  
##  1st Qu.:2.610   1st Qu.:125.0   1st Qu.:2.573   1st Qu.:110.0  
##  Median :2.744   Median :190.0   Median :2.720   Median :170.0  
##  Mean   :2.744   Mean   :259.1   Mean   :2.720   Mean   :245.6  
##  3rd Qu.:2.879   3rd Qu.:330.0   3rd Qu.:2.867   3rd Qu.:340.0  
##  Max.   :3.014   Max.   :670.0   Max.   :3.014   Max.   :840.0  
##  NA's   :2       NA's   :2                                      
##      Time3         Intensity3   
##  Min.   :2.450   Min.   : 80.0  
##  1st Qu.:2.591   1st Qu.:122.5  
##  Median :2.732   Median :215.0  
##  Mean   :2.732   Mean   :284.2  
##  3rd Qu.:2.873   3rd Qu.:385.0  
##  Max.   :3.014   Max.   :860.0  
##  NA's   :1       NA's   :1      
## 
## Duplicates:  0
##  NA Values:  6

## Perform within-group analysis of WAL pills.
peakanalyze(WAL_6.1)
## [1] "WAL_6.1"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.401   Min.   : 50.0   Min.   :2.401   Min.   : 10.0  
##  1st Qu.:2.555   1st Qu.: 62.5   1st Qu.:2.555   1st Qu.: 80.0  
##  Median :2.708   Median :135.0   Median :2.708   Median :130.0  
##  Mean   :2.708   Mean   :207.3   Mean   :2.708   Mean   :188.8  
##  3rd Qu.:2.861   3rd Qu.:252.5   3rd Qu.:2.861   3rd Qu.:277.5  
##  Max.   :3.014   Max.   :670.0   Max.   :3.014   Max.   :530.0  
##                                                                 
##      Time3         Intensity3   
##  Min.   :2.426   Min.   : 40.0  
##  1st Qu.:2.573   1st Qu.:100.0  
##  Median :2.720   Median :140.0  
##  Mean   :2.720   Mean   :196.8  
##  3rd Qu.:2.867   3rd Qu.:260.0  
##  Max.   :3.014   Max.   :530.0  
##  NA's   :1       NA's   :1      
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(WAL_6.2)
## [1] "WAL_6.2"
##      Time1         Intensity1      Time2         Intensity2        Time3      
##  Min.   :2.426   Min.   : 40   Min.   :2.401   Min.   : 60.0   Min.   :2.426  
##  1st Qu.:2.573   1st Qu.:130   1st Qu.:2.555   1st Qu.:112.5   1st Qu.:2.573  
##  Median :2.720   Median :170   Median :2.708   Median :180.0   Median :2.720  
##  Mean   :2.720   Mean   :264   Mean   :2.708   Mean   :242.3   Mean   :2.720  
##  3rd Qu.:2.867   3rd Qu.:360   3rd Qu.:2.861   3rd Qu.:330.0   3rd Qu.:2.867  
##  Max.   :3.014   Max.   :800   Max.   :3.014   Max.   :670.0   Max.   :3.014  
##  NA's   :1       NA's   :1                                     NA's   :1      
##    Intensity3   
##  Min.   : 70.0  
##  1st Qu.:130.0  
##  Median :150.0  
##  Mean   :259.2  
##  3rd Qu.:410.0  
##  Max.   :880.0  
##  NA's   :1      
## 
## Duplicates:  0
##  NA Values:  4

peakanalyze(WAL_6.3)
## [1] "WAL_6.3"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.450   Min.   : 70.0   Min.   :2.450   Min.   : 70.0  
##  1st Qu.:2.591   1st Qu.:137.5   1st Qu.:2.591   1st Qu.:117.5  
##  Median :2.732   Median :190.0   Median :2.732   Median :180.0  
##  Mean   :2.732   Mean   :238.3   Mean   :2.732   Mean   :265.8  
##  3rd Qu.:2.873   3rd Qu.:272.5   3rd Qu.:2.873   3rd Qu.:347.5  
##  Max.   :3.014   Max.   :560.0   Max.   :3.014   Max.   :760.0  
##  NA's   :1       NA's   :1       NA's   :1       NA's   :1      
##      Time3         Intensity3   
##  Min.   :2.426   Min.   : 40.0  
##  1st Qu.:2.573   1st Qu.:110.0  
##  Median :2.720   Median :140.0  
##  Mean   :2.720   Mean   :225.2  
##  3rd Qu.:2.867   3rd Qu.:270.0  
##  Max.   :3.014   Max.   :720.0  
##                                 
## 
## Duplicates:  0
##  NA Values:  4

## Perform between-group analysis of 136.5 92.90 peaks
bet_group_line(Bayer_6.1, PV_6.1,WAL_6.1)
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Warning: Removed 3 row(s) containing missing values (geom_path).
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Warning: Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_6.2, PV_6.2,WAL_6.2)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_6.3, PV_6.3,WAL_6.3)
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

between_groups(PV_6.1,PV_6.2,PV_6.3,WAL_6.1,WAL_6.2,WAL_6.3,Bayer_6.1,Bayer_6.2,
               Bayer_6.3)
## [1] "Between Group Summary: Bayer, PV, WAL"
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Brands       2   9134    4567   13.92 0.00557 **
## Residuals    6   1969     328                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## [1] "Tukey HSD Test:"
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = AUP ~ Brands)
## 
## $Brands
##                diff       lwr       upr     p adj
## PV-Bayer   74.81232  29.43420 120.19044 0.0055502
## WAL-Bayer  56.62286  11.24475 102.00098 0.0202975
## WAL-PV    -18.18946 -63.56758  27.18866 0.4801134

Bayer - Outliers in all three pills. Distribution is pretty narrow for each pill. Pill 1 intensity1 peak appears different than other two. Differences are found between all three in pills 2 and 3. AUCs are similar. PV - Outliers in all three pills. Pill 1 intensity 1 AUC different than other two. Line plots show differences in all three intensities. All intensities are slightly skewed. WAL - Outliers in all three pills. AUCs consistent. Line plots show differences between all three intensities in all three pills.

Betweeen group ANOVA - All three line plots show distinct differences between all three brands. Between group AOV shows a p-value of 0.00557. We can accept the alt hypothesis and conclude that at least one group is different. TukeyHSD shows that PV-Bayer and WAL-Bayer are different. QQplot shows a slight lower tail and residuals vs fitted shows a non-linear trend. However there is no pattern.

Bayer_7.1 <- read_excel('240.00 137.100.xlsx', sheet = 1)
Bayer_7.2 <- read_excel('240.00 137.100.xlsx', sheet = 2)
Bayer_7.3 <- read_excel('240.00 137.100.xlsx', sheet = 3)
PV_7.1 <- read_excel('240.00 137.100.xlsx', sheet = 4)
PV_7.2 <- read_excel('240.00 137.100.xlsx', sheet = 5)
PV_7.3 <- read_excel('240.00 137.100.xlsx', sheet = 6)
WAL_7.1 <- read_excel('240.00 137.100.xlsx', sheet = 7)
WAL_7.2 <- read_excel('240.00 137.100.xlsx', sheet = 8)
WAL_7.3 <- read_excel('240.00 137.100.xlsx', sheet = 9)

## Perform within-group analysis of Bayer pills. 
peakanalyze(Bayer_7.1)
## [1] "Bayer_7.1"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.377   Min.   : 40.0   Min.   :2.426   Min.   : 60.0  
##  1st Qu.:2.542   1st Qu.:140.0   1st Qu.:2.579   1st Qu.:112.5  
##  Median :2.708   Median :185.0   Median :2.732   Median :180.0  
##  Mean   :2.708   Mean   :288.9   Mean   :2.732   Mean   :258.1  
##  3rd Qu.:2.873   3rd Qu.:370.0   3rd Qu.:2.885   3rd Qu.:267.5  
##  Max.   :3.038   Max.   :980.0   Max.   :3.038   Max.   :850.0  
##                                  NA's   :2       NA's   :2      
##      Time3         Intensity3   
##  Min.   :2.401   Min.   : 40.0  
##  1st Qu.:2.561   1st Qu.:145.0  
##  Median :2.720   Median :190.0  
##  Mean   :2.720   Mean   :269.3  
##  3rd Qu.:2.879   3rd Qu.:305.0  
##  Max.   :3.038   Max.   :730.0  
##  NA's   :1       NA's   :1      
## 
## Duplicates:  0
##  NA Values:  6

peakanalyze(Bayer_7.2)
## [1] "Bayer_7.2"
##      Time1         Intensity1        Time2         Intensity2    
##  Min.   :2.401   Min.   : 50.0   Min.   :2.401   Min.   :  20.0  
##  1st Qu.:2.555   1st Qu.:132.5   1st Qu.:2.555   1st Qu.: 112.5  
##  Median :2.708   Median :205.0   Median :2.708   Median : 185.0  
##  Mean   :2.708   Mean   :278.5   Mean   :2.708   Mean   : 259.2  
##  3rd Qu.:2.861   3rd Qu.:287.5   3rd Qu.:2.861   3rd Qu.: 367.5  
##  Max.   :3.014   Max.   :850.0   Max.   :3.014   Max.   :1110.0  
##                                                                  
##      Time3         Intensity3   
##  Min.   :2.426   Min.   : 40.0  
##  1st Qu.:2.573   1st Qu.:120.0  
##  Median :2.720   Median :190.0  
##  Mean   :2.720   Mean   :279.2  
##  3rd Qu.:2.867   3rd Qu.:330.0  
##  Max.   :3.014   Max.   :800.0  
##  NA's   :1       NA's   :1      
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(Bayer_7.3)
## [1] "Bayer_7.3"
##      Time1         Intensity1        Time2         Intensity2   
##  Min.   :2.401   Min.   : 60.0   Min.   :2.401   Min.   : 40.0  
##  1st Qu.:2.555   1st Qu.: 95.0   1st Qu.:2.555   1st Qu.:100.0  
##  Median :2.708   Median :150.0   Median :2.708   Median :175.0  
##  Mean   :2.708   Mean   :272.7   Mean   :2.708   Mean   :241.2  
##  3rd Qu.:2.861   3rd Qu.:322.5   3rd Qu.:2.861   3rd Qu.:327.5  
##  Max.   :3.014   Max.   :890.0   Max.   :3.014   Max.   :780.0  
##                                                                 
##      Time3         Intensity3   
##  Min.   :2.426   Min.   : 20.0  
##  1st Qu.:2.573   1st Qu.: 90.0  
##  Median :2.720   Median :160.0  
##  Mean   :2.720   Mean   :257.6  
##  3rd Qu.:2.867   3rd Qu.:480.0  
##  Max.   :3.014   Max.   :780.0  
##  NA's   :1       NA's   :1      
## 
## Duplicates:  0
##  NA Values:  2

## Perform within-group analysis of PV pills
peakanalyze(PV_7.1)
## [1] "PV_7.1"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.475   Min.   : 110.0   Min.   :2.450   Min.   :  80.0  
##  1st Qu.:2.610   1st Qu.: 170.0   1st Qu.:2.591   1st Qu.: 140.0  
##  Median :2.744   Median : 290.0   Median :2.732   Median : 290.0  
##  Mean   :2.744   Mean   : 394.3   Mean   :2.732   Mean   : 394.2  
##  3rd Qu.:2.879   3rd Qu.: 575.0   3rd Qu.:2.873   3rd Qu.: 597.5  
##  Max.   :3.014   Max.   :1000.0   Max.   :3.014   Max.   :1080.0  
##  NA's   :1       NA's   :1                                        
##      Time3         Intensity3    
##  Min.   :2.450   Min.   :  90.0  
##  1st Qu.:2.591   1st Qu.: 147.5  
##  Median :2.732   Median : 240.0  
##  Mean   :2.732   Mean   : 382.1  
##  3rd Qu.:2.873   3rd Qu.: 412.5  
##  Max.   :3.014   Max.   :1470.0  
##                                  
## 
## Duplicates:  0
##  NA Values:  2

peakanalyze(PV_7.2)
## [1] "PV_7.2"
##      Time1         Intensity1         Time2         Intensity2   
##  Min.   :2.450   Min.   :  90.0   Min.   :2.450   Min.   :110.0  
##  1st Qu.:2.591   1st Qu.: 200.0   1st Qu.:2.591   1st Qu.:172.5  
##  Median :2.732   Median : 270.0   Median :2.732   Median :215.0  
##  Mean   :2.732   Mean   : 381.7   Mean   :2.732   Mean   :342.1  
##  3rd Qu.:2.873   3rd Qu.: 555.0   3rd Qu.:2.873   3rd Qu.:475.0  
##  Max.   :3.014   Max.   :1070.0   Max.   :3.014   Max.   :990.0  
##      Time3         Intensity3   
##  Min.   :2.450   Min.   : 90.0  
##  1st Qu.:2.591   1st Qu.:167.5  
##  Median :2.732   Median :230.0  
##  Mean   :2.732   Mean   :329.6  
##  3rd Qu.:2.873   3rd Qu.:365.0  
##  Max.   :3.014   Max.   :960.0  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(PV_7.3)
## [1] "PV_7.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.450   Min.   :  90.0   Min.   :2.426   Min.   :  80.0  
##  1st Qu.:2.591   1st Qu.: 185.0   1st Qu.:2.573   1st Qu.: 170.0  
##  Median :2.732   Median : 280.0   Median :2.720   Median : 220.0  
##  Mean   :2.732   Mean   : 386.2   Mean   :2.720   Mean   : 343.2  
##  3rd Qu.:2.873   3rd Qu.: 482.5   3rd Qu.:2.867   3rd Qu.: 390.0  
##  Max.   :3.014   Max.   :1250.0   Max.   :3.014   Max.   :1070.0  
##  NA's   :1       NA's   :1                                        
##      Time3         Intensity3  
##  Min.   :2.426   Min.   :  80  
##  1st Qu.:2.573   1st Qu.: 190  
##  Median :2.720   Median : 230  
##  Mean   :2.720   Mean   : 358  
##  3rd Qu.:2.867   3rd Qu.: 570  
##  Max.   :3.014   Max.   :1020  
##                                
## 
## Duplicates:  0
##  NA Values:  2

## Perform within-group analysis of WAL pills.
peakanalyze(WAL_7.1)
## [1] "WAL_7.1"
##      Time1         Intensity1         Time2         Intensity2      Time3      
##  Min.   :2.401   Min.   :  50.0   Min.   :2.450   Min.   : 50   Min.   :2.401  
##  1st Qu.:2.561   1st Qu.: 130.0   1st Qu.:2.597   1st Qu.:140   1st Qu.:2.561  
##  Median :2.720   Median : 190.0   Median :2.744   Median :190   Median :2.720  
##  Mean   :2.720   Mean   : 317.4   Mean   :2.744   Mean   :294   Mean   :2.720  
##  3rd Qu.:2.879   3rd Qu.: 385.0   3rd Qu.:2.892   3rd Qu.:470   3rd Qu.:2.879  
##  Max.   :3.038   Max.   :1430.0   Max.   :3.038   Max.   :820   Max.   :3.038  
##                                   NA's   :2       NA's   :2                    
##    Intensity3    
##  Min.   :  60.0  
##  1st Qu.: 105.0  
##  Median : 230.0  
##  Mean   : 285.2  
##  3rd Qu.: 325.0  
##  Max.   :1030.0  
##                  
## 
## Duplicates:  0
##  NA Values:  4

peakanalyze(WAL_7.2)
## [1] "WAL_7.2"
##      Time1         Intensity1         Time2         Intensity2      Time3      
##  Min.   :2.426   Min.   :  50.0   Min.   :2.426   Min.   :100   Min.   :2.426  
##  1st Qu.:2.573   1st Qu.: 180.0   1st Qu.:2.573   1st Qu.:180   1st Qu.:2.573  
##  Median :2.720   Median : 220.0   Median :2.720   Median :210   Median :2.720  
##  Mean   :2.720   Mean   : 361.6   Mean   :2.720   Mean   :314   Mean   :2.720  
##  3rd Qu.:2.867   3rd Qu.: 510.0   3rd Qu.:2.867   3rd Qu.:400   3rd Qu.:2.867  
##  Max.   :3.014   Max.   :1030.0   Max.   :3.014   Max.   :840   Max.   :3.014  
##    Intensity3  
##  Min.   :  60  
##  1st Qu.: 170  
##  Median : 230  
##  Mean   : 352  
##  3rd Qu.: 480  
##  Max.   :1030  
## 
## Duplicates:  0
##  NA Values:  0

peakanalyze(WAL_7.3)
## [1] "WAL_7.3"
##      Time1         Intensity1         Time2         Intensity2    
##  Min.   :2.426   Min.   :  50.0   Min.   :2.377   Min.   :  20.0  
##  1st Qu.:2.573   1st Qu.: 210.0   1st Qu.:2.536   1st Qu.: 165.0  
##  Median :2.720   Median : 250.0   Median :2.695   Median : 240.0  
##  Mean   :2.720   Mean   : 374.8   Mean   :2.695   Mean   : 328.1  
##  3rd Qu.:2.867   3rd Qu.: 450.0   3rd Qu.:2.855   3rd Qu.: 440.0  
##  Max.   :3.014   Max.   :1170.0   Max.   :3.014   Max.   :1040.0  
##  NA's   :2       NA's   :2                                        
##      Time3         Intensity3   
##  Min.   :2.377   Min.   : 30.0  
##  1st Qu.:2.536   1st Qu.:130.0  
##  Median :2.695   Median :200.0  
##  Mean   :2.695   Mean   :295.2  
##  3rd Qu.:2.855   3rd Qu.:385.0  
##  Max.   :3.014   Max.   :980.0  
##                                 
## 
## Duplicates:  0
##  NA Values:  4

## Perform between-group analysis of 136.5 92.90 peaks
bet_group_line(Bayer_7.1, PV_7.1,WAL_7.1)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Removed 2 row(s) containing missing values (geom_path).
## Warning: Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_7.2, PV_7.2,WAL_7.2)
## Warning: Removed 1 row(s) containing missing values (geom_path).

bet_group_line(Bayer_7.3, PV_7.3,WAL_7.3)
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Warning: Removed 2 row(s) containing missing values (geom_path).
## Warning: Removed 1 row(s) containing missing values (geom_path).

between_groups(PV_7.1,PV_7.2,PV_7.3,WAL_7.1,WAL_7.2,WAL_7.3,Bayer_7.1,Bayer_7.2,
               Bayer_7.3)
## [1] "Between Group Summary: Bayer, PV, WAL"
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Brands       2  14033    7016   19.79 0.00228 **
## Residuals    6   2127     354                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## [1] "Tukey HSD Test:"
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = AUP ~ Brands)
## 
## $Brands
##                diff       lwr        upr     p adj
## PV-Bayer   96.10057  48.93447 143.266669 0.0018857
## WAL-Bayer  57.52475  10.35864 104.690846 0.0224050
## WAL-PV    -38.57582 -85.74192   8.590278 0.1008561

Bayer - Outliers in all three pills. Pill 3 intensity3 is skewed. Distribution is narrow for all three intensities in pill 2. AUCs are consistent for all three pills. Line plots show differences between all three intensities in all three pills. PV - Outliers in all three pills. Varying distributions for all three pill intensities. AUCs are consistent. Line plots show differences between all three intensities in all three pills. WAL - Outliers in all three pills. All intensities are skewed for all pills. AUCs are consistent for all. Line plots show differences between all three intensities in all three pills.

Between group AOV - Line plots show distinct differences between all three brands in all three plots. Between group AOV shows a p-value of 0.00228. We can accept the alt hypothesis and conclude that at least one group is different. TukeyHSD shows that PV-Bayer and WAL-Bayer are different. QQplot shows residuals fit line well and Residuals vs fitted shows a pretty linear trend with no patterns.